﻿package org.demo.book;

import org.testdemo1.R;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
//import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
//import android.widget.TextView;

public class Book_Welcome_Activity extends Activity {
	OnClickListener listener_Book_Enter = null;//好整以暇
	OnClickListener listener_Book_Check = null;//时习之
	OnClickListener listener_Book_Help = null;//审问之
	OnClickListener listener_Book_Exit = null;//笃行之


	Button btn_Intro_Book_Enter;
	Button btn_Intro_Book_Check;
	Button btn_Intro_Book_Help;
	Button btn_Intro_Book_Exit;
	//TextView tv;

	
	public void onCreate(Bundle savedInstanceState)
	{	
		super.onCreate(savedInstanceState);
		setContentView(R.layout.intro_book_layout);
		
		//tv = (TextView)this.findViewById(R.id.intro_book_welcome);  
        //tv.setTextColor(Color.CYAN); 
		
		// 强制为横屏
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
		
		listener_Book_Enter = new OnClickListener()     //进入游戏
		{
			public void onClick(View v)
			{
				Intent intent0 = new Intent(Book_Welcome_Activity.this,
						Book_Game_Activity.class);
				startActivity(intent0);
			}
		};
		
		listener_Book_Check = new OnClickListener()     //查看成就
		{
			public void onClick(View v)
			{
				Intent intent = new Intent(Book_Welcome_Activity.this,
						Book_Goal_Activity.class);
				startActivity(intent);
			}
		};
		
		listener_Book_Help = new OnClickListener()     //操作说明
		{
			public void onClick(View v)
			{
				Intent intent = new Intent(Book_Welcome_Activity.this,
						Book_Info_Activity.class);
				startActivity(intent);
			}
		};
		
		listener_Book_Exit = new OnClickListener()     //退出
		{
			public void onClick(View v)
			{
				Book_Welcome_Activity.this.finish();
			}
		};
		
		btn_Intro_Book_Enter = (Button) findViewById(R.id.intro_book_enter);  //进入
		btn_Intro_Book_Enter.setOnClickListener(listener_Book_Enter);
		
		btn_Intro_Book_Check = (Button) findViewById(R.id.intro_book_check);  //查看成就
		btn_Intro_Book_Check.setOnClickListener(listener_Book_Check);
		
		btn_Intro_Book_Help = (Button) findViewById(R.id.intro_book_help);  //操作帮助
		btn_Intro_Book_Help.setOnClickListener(listener_Book_Help);
		
		btn_Intro_Book_Exit = (Button) findViewById(R.id.intro_book_exit);  //退出
		btn_Intro_Book_Exit.setOnClickListener(listener_Book_Exit);
	}
}
